<?php

class Application_Model_Ticket
{
	protected $_ticketNr;
	protected $_dauer;
	protected $_ticketName;
	protected $_preis;
	protected $_ticketArt;
	protected $_verfuegbar_ab;
	protected $_verfuegbar_bis;
	protected $_gueltig_ab;
	protected $_gueltig_bis;
	protected $_tage;

	public function __construct(array $options = null)
	{
		if (is_array($options)) {
			$this->setOptions($options);
		}
	}

	public function __set($name, $value)
	{
		$method = 'set' . $name;
		if (('mapper' == $name) || !method_exists($this, $method)) {
			throw new Exception('Invalid article property');
		}
		$this->$method($value);
	}

	public function __get($name)
	{
		$method = 'get' . $name;
		if (('mapper' == $name) || !method_exists($this, $method)) {
			throw new Exception('Invalid article property');
		}
		return $this->$method();
	}

	public function setOptions(array $options)
	{
		$methods = get_class_methods($this);
		foreach ($options as $key => $value) {
			$method = 'set' . ucfirst($key);
			if (in_array($method, $methods)) {
				$this->$method($value);
			}
		}
		return $this;
	}
	public function setNr($nr){
		$this->_ticketNr=$nr;
		return $this;
	}
	
	public function getNr(){
		return $this->_ticketNr;
	}
	
	public function setDauer($dauer){
		//ueberprüfungen
		
		$this->_dauer=$dauer;
		return $this;
	}
	
	public function getDauer(){
		return $this->_dauer;
	}
	
	public function setName($name){
		
		//ueberpruefung
		$this->_ticketName =$name;
		return $this;
	}
	
	public function getName(){
		return $this->_ticketName;
	}
	
	public function setPreis($preis){
		//ueberpruefung
		$this->_preis =$preis;
		return $this;
	}
	
	public function getPreis(){
		return $this->_preis;
	}
	
	public function setTicketart($ticketart){
		
		$this->_ticketArt=$ticketart;
		return $this;
	}
	
	public function getTicketart(){
		return $this->_ticketArt;
	}
	
	public function setVerfuegbar_ab($verfuegbar_ab){
		//ueberpruefung
		$this->_verfuegbar_ab =$verfuegbar_ab;
		return $this;
	}
	
	public function getVerfuegbar_ab(){
		return $this->_verfuegbar_ab;
	}
	
	public function setVerfuegbar_bis($verfuegbar_bis){
		//ueberpruefung
		$this->_verfuegbar_bis =$verfuegbar_bis;
		return $this;
	}
	
	public function getVerfuegbar_bis(){
		return $this->_verfuegbar_bis;
	}
	
	public function setGueltig_ab($gueltig_ab){
		//ueberpruefung
		$this->_gueltig_ab =$gueltig_ab;
		return $this;
	}
	
	public function getGueltig_ab(){
		return $this->_gueltig_ab;
	}
	
	public function setGueltig_bis($gueltig_bis){
		//ueberpruefung
		$this->_gueltig_bis =$gueltig_bis;
		return $this;
	}
	
	public function getGueltig_bis(){
		return $this->_gueltig_bis;
	}
	
public function setTage($tage){
		//ueberpruefung
		$this->_tage =$tage;
		return $this;
	}
	
	public function getTage(){
		return $this->_tage;
	}


}

